/**
 * Created by asus on 2017/5/6.������
 */
define(["jquery", "template", "scprit/department/view/template/missionManagement.js"], function ($, template, tpl) {
    var question = {};
    var inTable = function (data) {
        return template("table-con", data);

    }
    var type = function (data) {
        return template("type-h", data);
    }
    var name = function (data) {
        return template("name-h", data);
    }
    question.FollowUpTitInit = function (options) {
        $("body").append(tpl.inittable());
        var html = inTable(options.data);
        console.log(options.data);
        $("#" + options.id).html(html);

    }
    question.FollowUpTitInit1 = function (options) {
        $("body").append(tpl.inittype());
        console.log(setData1(options.data));
        var html = type(setData1(options.data));
        $("#" + options.id).append(html);
    }
    question.FollowUpTitInit2 = function (options) {
        $("body").append(tpl.initname());
        var html = name(options.data);
        $("#" + options.id).append(html);
    }
    function setData1(data) {
        var res = [];
        for (var i = 0; i < data.data.length; i++) {
            res.push(data.data[i]);
        }
        var data = {
            rows: res
        }

        return data;
    }
    return question;
});